package net.shopxx.service.impl;

import javax.annotation.Resource;

import net.shopxx.dao.MemberFavoriteProductDao;
import net.shopxx.entity.MemberFavoriteProduct;
import net.shopxx.service.MemberFavoriteProductService;

import org.springframework.stereotype.Service;
import org.springmodules.cache.annotations.CacheFlush;

/**
 * Service实现类 - 会员收藏产品
 * ============================================================================
 */

@Service
public class MemberFavoriteProductServiceImpl extends BaseServiceImpl<MemberFavoriteProduct, String> implements MemberFavoriteProductService {
	
	@Resource
	MemberFavoriteProductDao memberFavoriteProductDao;

	@Resource
	public void setBaseDao(MemberFavoriteProductDao memberFavoriteProductDao) {
		super.setBaseDao(memberFavoriteProductDao);
	}
	
	
	@Override
	@CacheFlush(modelId = "flushing")
	public void delete(MemberFavoriteProduct memberFavoriteProduct) {
		memberFavoriteProductDao.delete(memberFavoriteProduct);
	}

	@Override
	@CacheFlush(modelId = "flushing")
	public void delete(String id) {
		memberFavoriteProductDao.delete(id);
	}

	@Override
	@CacheFlush(modelId = "flushing")
	public void delete(String[] ids) {
		memberFavoriteProductDao.delete(ids);
	}

	@Override
	@CacheFlush(modelId = "flushing")
	public String save(MemberFavoriteProduct memberFavoriteProduct) {
		return memberFavoriteProductDao.save(memberFavoriteProduct);
	}

	@Override
	@CacheFlush(modelId = "flushing")
	public void update(MemberFavoriteProduct memberFavoriteProduct) {
		memberFavoriteProductDao.update(memberFavoriteProduct);
	}

}